/*
 */

package com.railway.notice.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.org.rapid_framework.page.Page;

import com.railway.common.base.BaseManager;
import com.railway.common.base.EntityDao;
import com.railway.notice.dao.INoticeDao;
import com.railway.notice.model.Notice;
import com.railway.notice.service.INoticeManager;
import com.railway.notice.vo.NoticeQuery;


/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


@Service("noticeManager")
@Transactional
public class NoticeManagerImpl extends BaseManager<Notice,java.lang.String> implements INoticeManager{

	private INoticeDao noticeDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setNoticeDao(INoticeDao dao) {
		this.noticeDao = dao;
	}
	public EntityDao getEntityDao() {
		return (EntityDao)this.noticeDao;
	}
	
	@Transactional(readOnly=true)
	public Page findPage(NoticeQuery query) {
		return noticeDao.findPage(query);
	}
	@Transactional(readOnly=true)
	public Notice getById(java.lang.String id){
		return (Notice)noticeDao.getById(id);
	}
	@Transactional
	public void removeById(java.lang.String id){
		super.removeById(id);
	}
	
	/** 插入数据 */
	@Transactional
	public void save(Notice entity){
		super.save(entity);
	}
	
	/** 更新数据 */
	@Transactional
	public void update(Notice entity){
		super.update(entity);
	}
	@Transactional(readOnly=true)
	public boolean isUnique(Notice entity, String uniquePropertyNames){
		return super.isUnique( entity, uniquePropertyNames);
	}
	@Transactional(readOnly=true)
	public List<Notice> findAll(){
		return super.findAll();
	}
	@Transactional
	public void saveOrUpdate(Notice entity) {
		super.saveOrUpdate(entity);
	}

}
